The present invention relates generally to methods and systems for shading computer generated images and more particularly to methods and apparatus for shading objects for display on a display device.
In many computer systems, it is common to represent and convey information to a user through digital images. These images may take a variety of forms such as alphanumeric characters and graphs and other pictorial representations. The digital images are conveyed to a users on a raster or continuous tone display devices, such as video monitors, printers and the like. Typically, the digital images are stored in digital form, manipulated and then displayed.
Digital images are generally stored as a geometric description of a scene. The description can be manipulated by the user, then converted to digital raster image data for display. How a two or three dimensional object appears when it is displayed to a user depends on numerous factors including the types of light sources illuminating it; its properties including color, texture and reflectance; and its position and orientation with respect to the light sources, the viewer and other surfaces which may reflect light on the object.
It is often desirable to present objects for display in color. In conventional practice, color may be applied to a region by defining a single color for the entire region (a "flat" coloring), or to add realism, a plurality of colors may be employed. A transition between colors across the surface of an object is referred to as a color gradient. In order to display a realistic image, a smooth transition between colors across painted areas is required. Conventionally, gradients have been created as pre-computed digital images. This technique leaves the user with limited flexibility because the gradient has already been rendered, and modifications are limited. Alternatively, gradients were defined as contours of constant color. These types of gradient also lack flexibility because the interpolation of colors in the gradient may be bivariate, which is difficult to be represented with contours and the number of contours used in the representation is device dependent.